class Solution {
    public void sortColors(int[] nums) {
        int nowIndex = -1;
        int len = nums.length;
        for(int i=0; i<len; i++){
            if(nums[i]==0){
                nowIndex ++;
                int tmp = nums[i];
                nums[i] = nums[nowIndex];
                nums[nowIndex] = tmp;
            }
        }
        // Sys
        int ii = nowIndex+1;
        for(int i=ii; i<len; i++){
            if(nums[i]==1){
                nowIndex ++;
                int tmp = nums[i];
                nums[i] = nums[nowIndex];
                nums[nowIndex] = tmp;
            }
        }
    }
}